package com.konne.nightmare.FastPublicOpinion.ui.personal.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.konne.nightmare.FastPublicOpinion.R;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpActivity;
import com.konne.nightmare.FastPublicOpinion.base.BaseMvpPresenter;
import com.konne.nightmare.FastPublicOpinion.utils.LoadProgressDialog;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @Author: chen
 * @UpdateDate: 1/22/22 8:36 PM
 * @UpdateRemark: 账户与安全
 */
public class AccountSafeActivity extends BaseMvpActivity implements View.OnClickListener {

    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.img_back)
    ImageView imgBack;

    @Override
    protected BaseMvpPresenter createPresenter() {
        return new BaseMvpPresenter();
    }

    @Override
    public int getLayout() {
        return R.layout.activity_account_safe;
    }

    @Override
    public void initView() {
        initImmersionBar(R.color.white, true);
        tvTitle.setText("账号与安全");

    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }

    @OnClick({R.id.img_back, R.id.rl_revise_code, R.id.rl_binding_phone, R.id.rl_binding_mail,
            R.id.rl_third_login,R.id.rl_logoff_account,R.id.rl_revise_password})
    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.img_back:
                finish();
                break;
            case R.id.rl_revise_code:
                startActivity(new Intent(this, ReviseCodeActivity.class));
                break;
            case R.id.rl_binding_phone:
                startActivity(new Intent(this, BindingPhoneActivity.class));
                break;
            case R.id.rl_binding_mail:
                startActivity(new Intent(this, BindingMailActivity.class));
                break;
            case R.id.rl_third_login:
                startActivity(new Intent(this, ThirdLoginActivity.class));
                break;
            case R.id.rl_logoff_account:
                startActivity(new Intent(this, LogoffAccountActivity.class));
                break;
            case R.id.rl_revise_password:
                startActivity(new Intent(this, RevisePasswordActivity.class));
                break;

        }
    }

    @Override
    public LoadProgressDialog getLoadDialog() {
        return dialog;
    }

    @Override
    public void cancelLoadDialog() {
        if (dialog != null && dialog.isShowing()) {
            dialog.cancel();
        }
    }
}

